package com.itheima.stock.mapper;

import com.itheima.stock.common.domain.InnerMarketDomain;
import com.itheima.stock.common.domain.OuterMarketDomain;
import com.itheima.stock.common.domain.Vol;
import com.itheima.stock.pojo.StockMarketIndexInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author byzhao
* @description 针对表【stock_market_index_info(股票大盘数据详情表)】的数据库操作Mapper
* @createDate 2022-10-01 20:05:23
* @Entity com.itheima.stock.pojo.StockMarketIndexInfo
*/
@Mapper
public interface StockMarketIndexInfoMapper {

    /**
     * 根据注定的id集合和日期查询大盘数据
     * @param ids 大盘id集合
     * @param lastDate 对应日期
     * @return
     */
    List<InnerMarketDomain> selectByIdsAndDate(@Param("ids") List<String> ids, @Param("lastDate") Date lastDate);

    List<Vol> selectStockTradevolCount(@Param("marketId") List<String> marketId, @Param("dateTime") Date dateTime, @Param("openDate") Date openDate);

    List<OuterMarketDomain> selectExternalIndex(@Param("ids") List<String> ids, @Param("date") Date date);

    int insertBatch(@Param("list") ArrayList<StockMarketIndexInfo> list);
}




